Reference: initProc (module) |
initProc initializes static data for a filter module.
Prototype |
int __cdecl initProc(FilterModule *fm, const FilterFunctions *ff, int& vdfd_ver, int& vdfd_compat); Parameters: fm Pointer to filter module structure ff Pointer to callback function structure vdfd_ver Highest filter API version supported by host vdfd_compat Lowest filter API version supported by host Return value: Zero on success, non-zero on failure. vdfd_ver should be set to the highest filter API known to the filter, VIRTUALDUB_FILTERDEF_VERSION. vdfd_compat should be set to the lowest filter API usable to the filter. This can be VIRTUALDUB_FILTERDEF_COMPATIBLE, but you can hardcode a higher value if you require features that aren't available in some versions. Exceptions: No exceptions should be thrown from this function. Requirements: Function must be provided by all filter modules. Function must be exported from filter DLL as: VirtualdubFilterModuleInit
Remarks |
This function should use the ff->addFilter() function to add all available filters in the module to VirtualDub's filter list. You can add as many filters as you want from a single module. If vdfd_ver is lower than the host's compatible API version, or vdfd_compat is higher than the host's supported API version, the host will display an error saying that the filter cannot be used.
VirtualDub API versions are as follows:
If you need to check for a particular buggy version of VirtualDub, try to either test directly for the bug or use getHostVersionInfo() before resorting to the API version.
VirtualDub external filter SDK 1.05 | ©1999-2001 Avery Lee <phaeron@virtualdub.org> |